import request from '@/utils/request'

// 获取月卡列表
export function getCarList(params) {
  return request({
    url: '/parking/card/list',
    method: 'get',
    params
  })
}

// 添加月卡
export function addCar(data) {
  return request({
    url: '/parking/card',
    method: 'post',
    data
  })
}

// 获取月卡信息详情
export function getCarInfo(id) {
  return request({
    url: `/parking/card/detail/${id}`,
    method: 'get'
  })
}

// 修改月卡信息
export function updateCar(data) {
  return request({
    url: '/parking/card/edit',
    method: 'put',
    data
  })
}

// 删除月卡
export function deleteCar(ids) {
  return request({
    url: `/parking/card/${ids}`,
    method: 'delete'
  })
}
